import request from '@/utils/request'

// 查询考试主列表
export function listExam(query) {
  return request({
    url: '/business/exam/list',
    method: 'get',
    params: query
  })
}

// 查询考试主所有列表
export function listAllExam(query) {
  return request({
    url: '/business/exam/listAll',
    method: 'get',
    params: query
  })
}

// 查询考试主详细
export function getExam(id) {
  return request({
    url: '/business/exam/getInfo/' + id,
    method: 'get'
  })
}

// 新增考试主
export function addExam(data) {
  return request({
    url: '/business/exam/add',
    method: 'post',
    data: data
  })
}

// 修改考试主
export function updateExam(data) {
  return request({
    url: '/business/exam/edit',
    method: 'post',
    data: data
  })
}

// 删除考试主
export function delExam(id) {
  return request({
    url: '/business/exam/remove/' + id,
    method: 'get'
  })
}
